package com.pinxi.VO;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * @Author shaohe_zhang
 * @Date 2022/1/24 14:24
 * @Version 1.0.0
 */
@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class SysResult {
    private Integer status;
    private String msg;
    private Object data;

    public static SysResult fail(){
        return new SysResult(201, "服务调用失败！", null);
    }

    public static SysResult success(){
        return new SysResult(200, "服务调用成功！", null);
    }

    public static SysResult success(Object data){
        return new SysResult(200, "服务调用成功！", data);
    }

    public static SysResult success(String msg,Object data){
        return new SysResult(200, msg, data);
    }
}
